add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
link_directories(${DEP_DIR}/lib/mariadb)
function(liboblog_unittest case)
  if(ARGC EQUAL 1)
    add_executable(${case} ${case}.cpp)
  else()
    add_executable(${ARGV})
  endif()
  target_link_libraries(${case} PRIVATE oceanbase oblog gtest gmock)
  disable_pch(${case})
  target_include_directories(${case}
    PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/unittest ${CMAKE_SOURCE_DIR}/deps/oblib/unittest ${DEP_DIR}/include)
endfunction()

liboblog_unittest(test_log_part_mgr)
liboblog_unittest(test_log_task_pool)
liboblog_unittest(test_small_arena)
#liboblog_unittest(test_log_config) // TODO may core, need fix
liboblog_unittest(test_log_fake_common_config)
liboblog_unittest(test_log_table_matcher)
liboblog_unittest(test_ob_map_queue)
liboblog_unittest(test_ob_map_queue_thread)
liboblog_unittest(test_ob_log_timer)
liboblog_unittest(test_ob_log_dlist)
liboblog_unittest(test_ob_log_part_svr_list)
liboblog_unittest(test_ob_log_all_svr_cache)
liboblog_unittest(test_ob_log_start_log_id_locator)
liboblog_unittest(test_ob_log_heartbeater)
liboblog_unittest(test_log_utils)
liboblog_unittest(test_ob_log_adapt_string)
liboblog_unittest(test_ob_concurrent_seq_queue)
liboblog_unittest(test_ob_seq_thread)
liboblog_unittest(test_ob_log_part_trans_resolver_new)
liboblog_unittest(test_log_svr_blacklist)
